<html><head>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<meta content="text/javascript" http-equiv="content-script-type">
<title>tango.util.collection.TreeBag</title>

<link rel="stylesheet" type="text/css" href="css/style.css">
<!--[if lt IE 7]><link rel="stylesheet" type="text/css" href="css/ie56hack.css"><![endif]-->
<script language="JavaScript" src="js/util.js" type="text/javascript"></script>
<script language="JavaScript" src="js/tree.js" type="text/javascript"></script>
<script language="JavaScript" src="js/explorer.js" type="text/javascript"></script>
<script>
function anchorFromTitle(title, path, ext) {
  var url = path + title + "." + ext;
  document.write("<a href='" + url + "'>" + title + "</a>");
  }
</script>
</head><body>
<div id="tabarea"></div><div id="explorerclient"></div>
<div id="content"><script>explorer.initialize("tango.util.collection.TreeBag");</script>
        <table class="content">
                <tr><td id="docbody"><h1><a href="http://www.dsource.org/projects/tango/browser/trunk/tango/util/collection/TreeBag.d?rev=3461">tango.util.collection.TreeBag</a></h1>
                
<dl>
<script>explorer.outline.writeEnabled = true;</script>
<dt><span class="decl"><li>class <span class="currsymbol"><a href="http://www.dsource.org/projects/tango/browser/trunk/tango/util/collection/TreeBag.d?rev=3461#L32">TreeBag</a></span>
<script>explorer.outline.addDecl('TreeBag');</script>(T) : BagCollection!(T), SortedValues!(T);</li></span></dt>
<script>explorer.outline.writeEnabled = false;</script>
<dd>
<font color="black">RedBlack trees.
 </font><br><br>
<b>author:</b><br>Doug Lea<br><br>
<dl>
<script>explorer.outline.writeEnabled = true;</script>
<dt><span class="decl"><li>RBCellT <span class="currsymbol"><a href="http://www.dsource.org/projects/tango/browser/trunk/tango/util/collection/TreeBag.d?rev=3461#L47">tree</a></span>
<script>explorer.outline.addDecl('tree');</script>; [package]</li></span></dt>
<script>explorer.outline.writeEnabled = false;</script>
<dd>
<font color="black">The root of the tree. Null if empty.
</font><br><br></dd>
<script>explorer.outline.writeEnabled = true;</script>
<dt><span class="decl"><li>ComparatorT <span class="currsymbol"><a href="http://www.dsource.org/projects/tango/browser/trunk/tango/util/collection/TreeBag.d?rev=3461#L52">cmp_</a></span>
<script>explorer.outline.addDecl('cmp_');</script>; [protected]</li></span></dt>
<script>explorer.outline.writeEnabled = false;</script>
<dd>
<font color="black">The comparator to use for ordering.
</font><br><br></dd>
<script>explorer.outline.writeEnabled = true;</script>
<dt><span class="decl"><li><span class="currsymbol"><a href="http://www.dsource.org/projects/tango/browser/trunk/tango/util/collection/TreeBag.d?rev=3461#L60">this</a></span>
<script>explorer.outline.addDecl('this');</script>(); [public]</li></span></dt>
<script>explorer.outline.writeEnabled = false;</script>
<dd>
<font color="black">Make an empty tree.
 Initialize to use DefaultComparator for ordering
</font><br><br></dd>
<script>explorer.outline.writeEnabled = true;</script>
<dt><span class="decl"><li><span class="currsymbol"><a href="http://www.dsource.org/projects/tango/browser/trunk/tango/util/collection/TreeBag.d?rev=3461#L70">this</a></span>
<script>explorer.outline.addDecl('this');</script>(Predicate <span class="funcparam">s</span>); [public]</li></span></dt>
<script>explorer.outline.writeEnabled = false;</script>
<dd>
<font color="black">Make an empty tree, using the supplied element screener.
 Initialize to use DefaultComparator for ordering
</font><br><br></dd>
<script>explorer.outline.writeEnabled = true;</script>
<dt><span class="decl"><li><span class="currsymbol"><a href="http://www.dsource.org/projects/tango/browser/trunk/tango/util/collection/TreeBag.d?rev=3461#L78">this</a></span>
<script>explorer.outline.addDecl('this');</script>(ComparatorT <span class="funcparam">c</span>); [public]</li></span></dt>
<script>explorer.outline.writeEnabled = false;</script>
<dd>
<font color="black">Make an empty tree, using the supplied element comparator for ordering.
</font><br><br></dd>
<script>explorer.outline.writeEnabled = true;</script>
<dt><span class="decl"><li><span class="currsymbol"><a href="http://www.dsource.org/projects/tango/browser/trunk/tango/util/collection/TreeBag.d?rev=3461#L86">this</a></span>
<script>explorer.outline.addDecl('this');</script>(Predicate <span class="funcparam">s</span>, ComparatorT <span class="funcparam">c</span>); [public]</li></span></dt>
<script>explorer.outline.writeEnabled = false;</script>
<dd>
<font color="black">Make an empty tree, using the supplied element screener and comparator
</font><br><br></dd>
<script>explorer.outline.writeEnabled = true;</script>
<dt><span class="decl"><li><span class="currsymbol"><a href="http://www.dsource.org/projects/tango/browser/trunk/tango/util/collection/TreeBag.d?rev=3461#L95">this</a></span>
<script>explorer.outline.addDecl('this');</script>(Predicate <span class="funcparam">s</span>, ComparatorT <span class="funcparam">cmp</span>, RBCellT <span class="funcparam">t</span>, int <span class="funcparam">n</span>); [protected]</li></span></dt>
<script>explorer.outline.writeEnabled = false;</script>
<dd>
<font color="black">Special version of constructor needed by clone&#40;&#41;
</font><br><br></dd>
<script>explorer.outline.writeEnabled = true;</script>
<dt><span class="decl"><li>int <span class="currsymbol"><a href="http://www.dsource.org/projects/tango/browser/trunk/tango/util/collection/TreeBag.d?rev=3461#L115">compare</a></span>
<script>explorer.outline.addDecl('compare');</script>(T <span class="funcparam">fst</span>, T <span class="funcparam">snd</span>); [private, final]</li></span></dt>
<script>explorer.outline.writeEnabled = false;</script>
<dd>
<font color="black">The default comparator</font><br><br>
<font color="black">@param fst first argument
 @param snd second argument
 </font><br><br>
<b>Returns:</b><br>
a negative number if fst is less than snd; a
 positive number if fst is greater than snd; else 0<br><br></dd>
<script>explorer.outline.writeEnabled = true;</script>
<dt><span class="decl"><li>TreeBag <span class="currsymbol"><a href="http://www.dsource.org/projects/tango/browser/trunk/tango/util/collection/TreeBag.d?rev=3461#L128">duplicate</a></span>
<script>explorer.outline.addDecl('duplicate');</script>(); [public]</li></span></dt>
<script>explorer.outline.writeEnabled = false;</script>
<dd>
<font color="black">Make an independent copy of the tree. Does not clone elements.
</font><br><br></dd>
<script>explorer.outline.writeEnabled = true;</script>
<dt><span class="decl"><li>bool <span class="currsymbol"><a href="http://www.dsource.org/projects/tango/browser/trunk/tango/util/collection/TreeBag.d?rev=3461#L145">contains</a></span>
<script>explorer.outline.addDecl('contains');</script>(T <span class="funcparam">element</span>); [public, final]</li></span></dt>
<script>explorer.outline.writeEnabled = false;</script>
<dd>
<font color="black">Implements tango.util.collection.impl.Collection.Collection.contains
 Time complexity: O&#40;log n&#41;.
 </font><br><br>
<b>See Also:</b><br>
tango.util.collection.impl.Collection.Collection.contains<br><br></dd>
<script>explorer.outline.writeEnabled = true;</script>
<dt><span class="decl"><li>uint <span class="currsymbol"><a href="http://www.dsource.org/projects/tango/browser/trunk/tango/util/collection/TreeBag.d?rev=3461#L158">instances</a></span>
<script>explorer.outline.addDecl('instances');</script>(T <span class="funcparam">element</span>); [public, final]</li></span></dt>
<script>explorer.outline.writeEnabled = false;</script>
<dd>
<font color="black">Implements tango.util.collection.impl.Collection.Collection.instances
 Time complexity: O&#40;log n&#41;.
 </font><br><br>
<b>See Also:</b><br>
tango.util.collection.impl.Collection.Collection.instances<br><br></dd>
<script>explorer.outline.writeEnabled = true;</script>
<dt><span class="decl"><li>GuardIterator!(T) <span class="currsymbol"><a href="http://www.dsource.org/projects/tango/browser/trunk/tango/util/collection/TreeBag.d?rev=3461#L171">elements</a></span>
<script>explorer.outline.addDecl('elements');</script>(); [public, final]</li></span></dt>
<script>explorer.outline.writeEnabled = false;</script>
<dd>
<font color="black">Implements tango.util.collection.impl.Collection.Collection.elements
 Time complexity: O&#40;1&#41;.
 </font><br><br>
<b>See Also:</b><br>
tango.util.collection.impl.Collection.Collection.elements<br><br></dd>
<script>explorer.outline.writeEnabled = true;</script>
<dt><span class="decl"><li>int <span class="currsymbol"><a href="http://www.dsource.org/projects/tango/browser/trunk/tango/util/collection/TreeBag.d?rev=3461#L181">opApply</a></span>
<script>explorer.outline.addDecl('opApply');</script>(int delegate (inout T value) <span class="funcparam">dg</span>);</li></span></dt>
<script>explorer.outline.writeEnabled = false;</script>
<dd>
<font color="black">Implements tango.util.collection.model.View.View.opApply
 Time complexity: O&#40;n&#41;.
 </font><br><br>
<b>See Also:</b><br>
tango.util.collection.model.View.View.opApply<br><br></dd>
<script>explorer.outline.writeEnabled = true;</script>
<dt><span class="decl"><li>ComparatorT <span class="currsymbol"><a href="http://www.dsource.org/projects/tango/browser/trunk/tango/util/collection/TreeBag.d?rev=3461#L196">comparator</a></span>
<script>explorer.outline.addDecl('comparator');</script>(); [public, final]</li></span></dt>
<script>explorer.outline.writeEnabled = false;</script>
<dd>
<font color="black">Implements tango.util.collection.ElementSortedCollection.comparator
 Time complexity: O&#40;1&#41;.
 </font><br><br>
<b>See Also:</b><br>
tango.util.collection.ElementSortedCollection.comparator<br><br></dd>
<script>explorer.outline.writeEnabled = true;</script>
<dt><span class="decl"><li>void <span class="currsymbol"><a href="http://www.dsource.org/projects/tango/browser/trunk/tango/util/collection/TreeBag.d?rev=3461#L205">comparator</a></span>
<script>explorer.outline.addDecl('comparator');</script>(ComparatorT <span class="funcparam">cmp</span>); [public, final]</li></span></dt>
<script>explorer.outline.writeEnabled = false;</script>
<dd>
<font color="black">Reset the comparator. Will cause a reorganization of the tree.
 Time complexity: O&#40;n log n&#41;.
</font><br><br></dd>
<script>explorer.outline.writeEnabled = true;</script>
<dt><span class="decl"><li>void <span class="currsymbol"><a href="http://www.dsource.org/projects/tango/browser/trunk/tango/util/collection/TreeBag.d?rev=3461#L237">clear</a></span>
<script>explorer.outline.addDecl('clear');</script>(); [public, final]</li></span></dt>
<script>explorer.outline.writeEnabled = false;</script>
<dd>
<font color="black">Implements tango.util.collection.impl.Collection.Collection.clear.
 Time complexity: O&#40;1&#41;.
 </font><br><br>
<b>See Also:</b><br>
tango.util.collection.impl.Collection.Collection.clear<br><br></dd>
<script>explorer.outline.writeEnabled = true;</script>
<dt><span class="decl"><li>void <span class="currsymbol"><a href="http://www.dsource.org/projects/tango/browser/trunk/tango/util/collection/TreeBag.d?rev=3461#L248">removeAll</a></span>
<script>explorer.outline.addDecl('removeAll');</script>(T <span class="funcparam">element</span>); [public, final]</li></span></dt>
<script>explorer.outline.writeEnabled = false;</script>
<dd>
<font color="black">Implements tango.util.collection.impl.Collection.Collection.removeAll.
 Time complexity: O&#40;log n * instances&#40;element&#41;&#41;.
 </font><br><br>
<b>See Also:</b><br>
tango.util.collection.impl.Collection.Collection.removeAll<br><br></dd>
<script>explorer.outline.writeEnabled = true;</script>
<dt><span class="decl"><li>void <span class="currsymbol"><a href="http://www.dsource.org/projects/tango/browser/trunk/tango/util/collection/TreeBag.d?rev=3461#L259">remove</a></span>
<script>explorer.outline.addDecl('remove');</script>(T <span class="funcparam">element</span>); [public, final]</li></span></dt>
<script>explorer.outline.writeEnabled = false;</script>
<dd>
<font color="black">Implements tango.util.collection.impl.Collection.Collection.removeOneOf.
 Time complexity: O&#40;log n&#41;.
 </font><br><br>
<b>See Also:</b><br>
tango.util.collection.impl.Collection.Collection.removeOneOf<br><br></dd>
<script>explorer.outline.writeEnabled = true;</script>
<dt><span class="decl"><li>void <span class="currsymbol"><a href="http://www.dsource.org/projects/tango/browser/trunk/tango/util/collection/TreeBag.d?rev=3461#L269">replace</a></span>
<script>explorer.outline.addDecl('replace');</script>(T <span class="funcparam">oldElement</span>, T <span class="funcparam">newElement</span>); [public, final]</li></span></dt>
<script>explorer.outline.writeEnabled = false;</script>
<dd>
<font color="black">Implements tango.util.collection.impl.Collection.Collection.replaceOneOf
 Time complexity: O&#40;log n&#41;.
 </font><br><br>
<b>See Also:</b><br>
tango.util.collection.impl.Collection.Collection.replaceOneOf<br><br></dd>
<script>explorer.outline.writeEnabled = true;</script>
<dt><span class="decl"><li>void <span class="currsymbol"><a href="http://www.dsource.org/projects/tango/browser/trunk/tango/util/collection/TreeBag.d?rev=3461#L279">replaceAll</a></span>
<script>explorer.outline.addDecl('replaceAll');</script>(T <span class="funcparam">oldElement</span>, T <span class="funcparam">newElement</span>); [public, final]</li></span></dt>
<script>explorer.outline.writeEnabled = false;</script>
<dd>
<font color="black">Implements tango.util.collection.impl.Collection.Collection.replaceAllOf.
 Time complexity: O&#40;log n * instances&#40;oldElement&#41;&#41;.
 </font><br><br>
<b>See Also:</b><br>
tango.util.collection.impl.Collection.Collection.replaceAllOf<br><br></dd>
<script>explorer.outline.writeEnabled = true;</script>
<dt><span class="decl"><li>T <span class="currsymbol"><a href="http://www.dsource.org/projects/tango/browser/trunk/tango/util/collection/TreeBag.d?rev=3461#L290">take</a></span>
<script>explorer.outline.addDecl('take');</script>(); [public, final]</li></span></dt>
<script>explorer.outline.writeEnabled = false;</script>
<dd>
<font color="black">Implements tango.util.collection.impl.Collection.Collection.take.
 Time complexity: O&#40;log n&#41;.
 Takes the least element.
 </font><br><br>
<b>See Also:</b><br>
tango.util.collection.impl.Collection.Collection.take<br><br></dd>
<script>explorer.outline.writeEnabled = true;</script>
<dt><span class="decl"><li>void <span class="currsymbol"><a href="http://www.dsource.org/projects/tango/browser/trunk/tango/util/collection/TreeBag.d?rev=3461#L313">addIf</a></span>
<script>explorer.outline.addDecl('addIf');</script>(T <span class="funcparam">element</span>); [public, final]</li></span></dt>
<script>explorer.outline.writeEnabled = false;</script>
<dd>
<font color="black">Implements tango.util.collection.MutableBag.addIfAbsent
 Time complexity: O&#40;log n&#41;.
 </font><br><br>
<b>See Also:</b><br>
tango.util.collection.MutableBag.addIfAbsent<br><br></dd>
<script>explorer.outline.writeEnabled = true;</script>
<dt><span class="decl"><li>void <span class="currsymbol"><a href="http://www.dsource.org/projects/tango/browser/trunk/tango/util/collection/TreeBag.d?rev=3461#L324">add</a></span>
<script>explorer.outline.addDecl('add');</script>(T <span class="funcparam">element</span>); [public, final]</li></span></dt>
<script>explorer.outline.writeEnabled = false;</script>
<dd>
<font color="black">Implements tango.util.collection.MutableBag.add.
 Time complexity: O&#40;log n&#41;.
 </font><br><br>
<b>See Also:</b><br>
tango.util.collection.MutableBag.add<br><br></dd>
<script>explorer.outline.writeEnabled = true;</script>
<dt><span class="decl"><li>void <span class="currsymbol"><a href="http://www.dsource.org/projects/tango/browser/trunk/tango/util/collection/TreeBag.d?rev=3461#L419">checkImplementation</a></span>
<script>explorer.outline.addDecl('checkImplementation');</script>(); [public, override]</li></span></dt>
<script>explorer.outline.writeEnabled = false;</script>
<dd>
<font color="black">Implements tango.util.collection.model.View.View.checkImplementation.
 </font><br><br>
<b>See Also:</b><br>
tango.util.collection.model.View.View.checkImplementation<br><br></dd>
<script>explorer.outline.writeEnabled = true;</script>
<dt><span class="decl"><li>class <span class="currsymbol"><a href="http://www.dsource.org/projects/tango/browser/trunk/tango/util/collection/TreeBag.d?rev=3461#L451">CellIterator</a></span>
<script>explorer.outline.addDecl('CellIterator');</script>(T) : AbstractIterator!(T);</li></span></dt>
<script>explorer.outline.writeEnabled = false;</script>
<dd>
<font color="black">opApply&#40;&#41; has migrated here to mitigate the virtual call
                on method get&#40;&#41;
                
</font><br><br>
</dd></dl></dd></dl></td></tr>
                <tr><td id="docfooter">
                         :: page rendered by CandyDoc. Generated by <a href="http://code.google.com/p/dil">dil</a> on Sun Jun  8 17:12:54 2008.
                </td></tr>
        </table>
</div>
<script></script>
</body></html>